<!--
 * @Author: 追逐的娃 kangchao_php@163.com
 * @Date: 2024-07-04 16:11:56
 * @LastEditors: 追逐的娃 kangchao_php@163.com
 * @LastEditTime: 2024-10-30 11:28:18
 * @FilePath: \vue-project\src\components\Preview\Index.vue
 * @Description: https://www.npmjs.com/package/@vue-office/excel
 * 
-->
<template>
  <a-card>
    <h2 class="mb-2">预览相关1</h2>
    <div class="w-sm flex justify-between">
      <a-link
        href="javascript:;"
        @click="
          filePath =
            'http://58.22.55.94:30003/ltywpt-minio/fujian/a343dd59a1834ff2b0ac3ce6e02e7bd4.pdf'
        "
        >预览pdf</a-link
      >
      <a-link href="javascript:;" @click="filePath = 'http://static.shanhuxueyuan.com/test6.docx'"
        >预览word</a-link
      >
      <a-link
        href="javascript:;"
        @click="filePath = 'http://static.shanhuxueyuan.com/demo/excel.xlsx'"
        >预览Excel</a-link
      >
      <a-link
        href="javascript:;"
        @click="filePath = 'https://www.wuhua.gov.cn/mzwhksj/img/0/91/91949/2064098.jpg'"
        >预览图片</a-link
      >
    </div>
  </a-card>
  <!-- 引入预览组件 -->
  <FilePreview :filePath="filePath" @closeModal="filePath = ''" />
</template>

<script setup>
import { ref } from 'vue'
import FilePreview from './FilePreview.vue'

const filePath = ref('')
</script>

<style lang="scss" scoped>
</style>
